Repository navigation
fix(pm-console): keep GitHub's answers in the object's storage; its memory did not last between reads - #14000
Merged
Merged
Conversation
The plan pages' test asked that the id roadmap have at least ten rows. The planners tidied it to eight (#12663, merged 2026-11-24 00:34Z), and every run of the console's tests has failed since: the next change to the console would have been stopped at the deploy's first step. What the count was for is a parser that reads nothing passing the loop above it. It now asks that the roadmap files have rows between them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…ts memory #13570 kept GitHub's answers (asked for again by their tags), the times it said to ask again and the count of its answers in the Worker object's memory. Cloudflare takes an idle Durable Object out of memory after about ten seconds and starts another on the next request, and this object reads a list every minute or so: in service every read was made by an object that had kept nothing, every read was a full one, and nothing was saved. Seen on the live Worker on 2026-11-24 at 00:45Z: health said answers 0, unchanged 0, kept 0, seven minutes after a self-check that had made four reads. Nothing caught it because every test, every planted fault and the real-runtime check read a list twice within one object's life. - The memory is kept in the object's storage. An answer is stored in pieces of 600,000 characters, each marked with the address and tag it belongs to, under one index written last: an answer half stored when the object was put away reads as nothing kept. 240 answers and thirty million characters at most, the one longest unasked-for going first. Places are few and used again, and whoever writes to one clears whatever else is in it. One change is made at a time. - GitHub's wait and the count are stored the same way. Health counts since `github.since` whichever object answered, and says when the object answering started (`woke`). - A store that cannot be read is not written over, and is tried again. - Deadlines on outgoing requests are made with `timed`, which clears its timer when the request is over. `AbortSignal.timeout` leaves its timer running for the whole deadline, and an object with a timer running is not put away: in the local runtime, 26 seconds in memory after one call of GitHub against under 14 with no timer left. A body that will not be read is let go of at once. - The real-runtime check leaves the Worker alone until health says another object answers, and asks its questions of that one. With the memory in the object's mind, as first built, it fails. The design record has the correction in full. Refs #13489, #13504 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…s build Two issues filed on 2026-11-23 had no row: #13831 (the edge does what it holds for a machine itself, once it can) and #13833 (the laptop's console follows main). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…ve been written A wait read back is kept to for no longer than one can be set for (sixty-five minutes): a time further off in storage would otherwise keep the edge from asking GitHub until the owner said to try again. An index line that says more pieces than an answer kept here can have, or a length no answer has, is not taken: what is read back says how many pieces to clear and how much is held. The record names #14001 for what else the object keeps only in memory. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
This was referenced Nov 24, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
#13570 kept GitHub's answers (to ask for again by their tags), the times GitHub said to ask again, and the count of its answers in the Worker object's memory. Cloudflare takes an idle Durable Object out of memory after about ten seconds and starts another, with nothing in memory, on the next request (lifecycle). This object reads a list every minute or so. So in service every read was made by an object that had kept nothing: every read was a full one, and nothing was saved.
What was said when #13570 merged, that a list that has not changed no longer uses any of the hourly allowance, was true of the tests and not of the deployed Worker.
Found by reading the live Worker two hours after the deploy (2026-11-24 00:45Z): health showed
github: {answers: 0, unchanged: 0, kept: 0}seven minutes after a self-check that had made four reads, with no deploy in between.Why nothing caught it: every unit test, every planted fault and the real-runtime check read a list twice within one object's life. The edge's tests could start a new object over the same storage all along; none of the memory's tests did.
What this changes
edge/src/direct.ts,githubMemory). An answer is stored in pieces of 600,000 characters: a stored value holds about two million bytes, and the real list of sixty open pull requests was 1.4 million characters of two bytes each when measured today. Each piece is marked with the address and tag it belongs to; one index names the pieces and is written last. An answer half stored when the object was put away, or when the store failed, reads as nothing kept, never as an answer.github.answersandgithub.unchangedare counted sincegithub.since, whichever object answered.woke), so how long one lasts can be seen from outside.src/timed.ts).AbortSignal.timeoutleaves its timer running for the whole deadline after the request is over, and an object with a timer running is not put away. Measured in the local runtime: an object that had asked GitHub one thing (twenty seconds allowed) was still in memory 26 s after its last request and gone by 32; one that had left no timer was there at 11 s and gone within 14. Deadlines for GitHub, the push services, the key set, the released build and the dashboard now clear their timer when the request is over, and an answer whose body will not be read is let go of at once (the old deadline did that only when it ran out). A test follows the Worker's imports and fails if anything it runs usesAbortSignal.timeout.scripts/edge-smoke.ts): it leaves the Worker alone until health says another object answers, then asks the first one's questions of it.test/plan.test.ts). It asked that the id roadmap have at least ten rows; the planners tidied it to eight at 00:34Z (docs(roadmap): program-tending drift fix (landed forward items) #12663), and every run of the console's tests has failed since, which would stop the next deploy. It now asks that the roadmap files have rows between them and leaves how many each has to the planners.Checked
bun test: 403 pass. Type check, formatter and the markdown check clean. Both builds (node build.mjs, the bundle the deploy uses) succeed.wrangler dev): all 41 checks pass. Left alone for 15 s the object was put away; the next one still asked for a long answer (over 1.2 million characters of two units each, one cut in half by a piece's edge) by its tag, and GitHub's stand-in still answered "not modified"; a wait GitHub had set was still kept to; "Try again now" lifted it; the count went on from the one before. With the memory in the object's own memory, as first built, the same run fails two checks (the wait is forgotten: "4 calls while quiet").Not checked
github.keptabove nought andgithub.unchangedgrowing whilewokechanges. I will read it and say what it shows on pm-console edge: its own GitHub allowance, so the core does not stop when the fleet is busy #13489.Not in this
The same wrong assumption sits in a few other places in the object (the ten-minute gate on asking for the released Android build is in memory; the queue store is asked with no deadline). #14001 has the list, to be gone through one by one.
Refs #13489, #13504. Design record: the 2026-11-24T01:45Z correction in
doc/2026-11-23T06-50-00Z_architecture_pm_platform_cloudflare_core/.https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
Generated by Claude Code